<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>数组去重</title>
	</head>
	<body>
	</body>
</html>
<script>
//在数组str1中删除在数组str2中也出现的内容
	var str1 = [1,2,4,5,6,4,5,10];
	var str2 = [1,2,8,,15,64,21,10];
	var a = [];
	for(var i=0,len=str1.length;i<len;i++)
	{
		if(str2.indexOf(str1[i])<0)
		{
			a.push(str1[i]);
		}
	}
	console.log(a);
</script>